Where’s the coal? Export locations & demographics

Author

Shradha Dinesh

Published

June 5, 2024

Story memo

I will work on learning the TidyCensus R package to retrieve demographic data for all census tracts and counties nationally. Later, I will work with train route shapefiles, creating buffers and performing a spatial join to merge our demographic and geographic data. By the end of this week, I will have completed a high-level summary analysis of demographics for a few cities/towns along a specific coal (or train) route.

Stories about particulate pollution in the industrial sector have described the air, earth, and our waterways. This would be the first comprehensive look at towns along coal transportation routes – particularly prescient in the wake of major freight derailments, contamination events, and discussions about regulating the length and staff numbers aboard freight transport.

The potential impact of this project could be increased investment (social and financial) for particulate monitoring sensors along transportation hubs and/or increased industrial regulation for coal transporters. The social impact would be increasing the public awareness of industrial air pollution or providing an explanation for the phenomenon in affected communities.

This story would feature visual components like maps and other data graphics and photos and videos of coal trains and transportation routes.

To complete this high level demographic analysis, I will need to begin working with train route shapefiles as a next step.

Below, I have provided the code to produce dataframes with county and tract level demographic information, including race/ethnicity, poverty rate, and median income. These dataframes are stored as census_tract_stats and census_county_stats in the data directory.

Import dependencies

# use this block for imports
library(leaflet) # for mapping
library(sf) # for mapping

Working with Census demographic data

Task for tonight: render demographic profiles of Silver Spring, Hyattsville and Harpers Ferry WV.

Get to: The CSX train runs through Hyattsville, which has XX% white and xx% black, hispanic % and the median income. and compare that to means for the demographics and medians for income statewide

Mapping coal export locations

We have our demographic data at a county and tract level, but we will be using counties for visualization since they render significantly faster in our browser. Tract-level data is available in the data folder.

# import point and shapefiles for mapping

# Load point data
data = read.csv("data/coal-export-terminals-us.csv")
points_sf <- st_as_sf(data, coords = c("Longitude", "Latitude"), crs = 4269)

# Load census county shapefiles
census_counties <- st_read("data/all_census_counties_us.shp", quiet=TRUE)
# Create the map
map <- leaflet(options = leafletOptions(preferCanvas = TRUE)) %>%
  addTiles() %>%
  setView(lng = -96.25, lat = 39.50, zoom = 4) %>% 
  addPolygons(data = census_counties,
              fillColor = "lightgray",
              color = "gray",
              weight = 1,
              fillOpacity = 0.5) %>% 
  addCircleMarkers(
              data = points_sf,
             color = "red",
             opacity = 0.8,
             weight = 2,
             radius = 5)
map